package com.pcbly.web.business.system;

/**
 * @author carl.song
 * Copyright (c) 2010 Lightsoft, International.
 * All rights reserved.
 *
 */

import java.util.List;

import com.pcbly.web.persistence.system.ProvinceCityDao;
import com.pcbly.web.bean.system.ProvinceCityBean;
import com.pcbly.web.business.BaseServiceImp;
import com.pcbly.web.components.hibernate.support.Page;

public class ProvinceCityServiceImp extends BaseServiceImp<ProvinceCityBean>
		implements ProvinceCityService {
	public ProvinceCityServiceImp() {
		super();
		// TODO Auto-generated constructor stub
	}

	private ProvinceCityDao provinceCityDao;

	public void setProvinceCityDao(ProvinceCityDao provinceCityDao) {
		this.provinceCityDao = provinceCityDao;
	}

	@Override
	public ProvinceCityBean getProvinceCityBeanById(String id) throws Exception {
		// TODO Auto-generated method stub
		return provinceCityDao.get(ProvinceCityBean.class, id);
	}

	@Override
	public void removeProvinceCityBeanById(String id) throws Exception {
		provinceCityDao.removeById(ProvinceCityBean.class, id);
	}

	@Override
	public void removeProvinceCityBeanByIds(String ids) throws Exception {
		provinceCityDao.removeProvinceCityBeanByIds(ids);
	}

	@Override
	public void saveProvinceCityBean(ProvinceCityBean system) throws Exception {
		provinceCityDao.saveProvinceCityBean(system);
	}

	@Override
	public void updateProvinceCityBean(ProvinceCityBean system)
			throws Exception {
		provinceCityDao.saveObject(system);
	}

	public Page<ProvinceCityBean> findProvinceCityBeanByCond(
			ProvinceCityBean bean, Page<ProvinceCityBean> page,
			String orderByName, boolean asc) throws Exception {
		return provinceCityDao.findProvinceCityBeanByCond(bean, page,
				orderByName, asc);
	}

	@Override
	public List<ProvinceCityBean> findProvinceCityBeansByParentId(
			String parentId) throws Exception {
		// TODO Auto-generated method stub
		return provinceCityDao.findProvinceCityBeansByParentId(parentId);
	}
}
